package com.zeroone.star.publish.config;

import com.zeroone.star.publish.utils.JWTInterceptor;
import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @program: car-time-bank
 * @description:
 * @author: car
 * @create: 2024-03-06 10:04
 **/

@Configurable
public class InterceptorConfig implements WebMvcConfigurer {
    //过滤器
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new JWTInterceptor())
                //拦截
                .addPathPatterns("/token/user/test");
    }
}
